package com.zgkxzx.mvvmbase.viewmodel;

import android.content.Context;

import java.lang.ref.WeakReference;

/**
 * 创建者 zgkxzx
 * 日期   2/1/18
 * 描述
 */

public abstract class BaseViewModel {
    protected static WeakReference<Context> contextRef;

    public BaseViewModel(Context context) {
        this.contextRef = new WeakReference<Context>(context);
    }

    /**
     * 创建ViewModel
     */
    public abstract void onCreate();

    /**
     * 销毁ViewModel
     */
    public abstract void onDestroy();
}
